package com.smashcrush.client.gwt.service;

import java.util.Map;

import com.google.code.jsonrpc.client.JsonRemoteService;
import com.google.code.jsonrpc.client.POST;
import com.google.code.jsonrpc.client.Path;
import com.google.code.jsonrpc.client.PathParam;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smashcrush.model.Script;
import com.smashcrush.model.ScriptResults;

/**
 * The client side stub for the RPC service.
 */
public interface TestingServiceAsync extends JsonRemoteService {

	public static class RPC {
		public static TestingServiceAsync get() {
			TestingServiceAsync ourInstance = GWT
					.create(TestingServiceAsync.class);
			return ourInstance;
		}
	}

	@POST
	@Path("/api/testing/token/{token}/poll/results")
	public void pollResults(@PathParam("token") String token,
			AsyncCallback<ScriptResults> callback);

	@POST
	@Path("/api/testing/token/{token}/push/script")
	public void pushScript(@PathParam("token") String token, Script script,
			AsyncCallback<Void> callback);

}
